# TODO 捕获单个异常
"""
try:
    num = int(input('数字:'))
    result = 1 / num
except ZeroDivisionError as e:
    print(e)
"""

# TODO 捕获多个异常
try:
    num = int(input('数字:'))
    result = 1 / num
except (ZeroDivisionError, ValueError, NameError) as e:
    print(e)
